import React from 'react'
import styles from './App.module.css'

// 函数式子组件
export const FSon = (props: any) => {
  const { msg, changeMsg } = props
  const handleClick = () => {
    changeMsg('我就不回去')
  }
  return (
    <div className={styles.two}>
      <div>函数子组件：</div>
      {msg}
      <button onClick={handleClick}>change</button>
    </div>
  )
}
